package com.yf.config;

import com.yf.interceptor.AuthInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ClassName AuthConfig
 * @Description TODO
 * @Author yf
 * @Date 2018/10/15 14:57
 * @Version 1.0
 */
@Configuration
public class AuthConfiguration implements WebMvcConfigurer {
    private final Logger logger = LoggerFactory.getLogger(AuthConfiguration.class);
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        logger.info("AuthConfiguration addInterceptors 执行了");
        registry.addInterceptor(new AuthInterceptor());
    }
}
